MiniZinc: flattening error: unbounded coefficient in linear expression. Make sure variables involved in non-linear/logical expressions have finite bounds in their definition or via constraints, or
MiniZinc: evaluation error: arithmetic operation on infinite value
```
var -100.00..100.00: x;
var -100.00..100.00: y;
constraint -100 <= x /\ x <= 100;
constraint -100 <= y /\ y <= 100;
% decision tree
% var bool: dt = if x>=1 then y=x else y=0 endif;
var bool: dt = (x>=1 -> y=x) /\ (x<1 -> y=0.0);
constraint dt;
solve satisfy;
output "Result: \(x) \(y) => \(dt).\n";
```
Try that.
I
believe that `float`s can be considered by some solvers as
somewhat infinite.
Notice
that I added the ` -100.00..100:` to the two variables.
DSL
--
You received this message because you are subscribed to the Google Groups "MiniZinc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minizinc+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/minizinc/4e19dfe5-4b0c-4f65-916e-c8f980e945bcn%40googlegroups.com.
x = -99.9999999999999;
y = -4.94065645841246e-324;
----------
x = -99.99999999999713;
y = -0.0;
----------